import 'package:flutter/material.dart';
import 'package:trollee/app/core/values/colors.dart';
import 'package:trollee/app/core/values/dimens.dart';

// ignore_for_file: non_constant_identifier_names

/// APP 文本样式, 根据设计师提供的设计规范来调整, 保持跟figma一致
abstract class AppTextStyles {
  AppTextStyles._();

  static TextStyle get text_24_bold_primary => TextStyle(
        fontSize: AppDimens.sp24,
        height: 30 / 24,
        fontWeight: FontWeight.bold,
        color: AppColors.font_color_primary,
      );

  static TextStyle get text_22_bold_black => TextStyle(
        fontWeight: FontWeight.bold,
        height: 26 / 20,
        color: AppColors.font_color_black,
        fontSize: AppDimens.sp22,
      );

  static TextStyle get text_22_bold_primary => TextStyle(
        fontWeight: FontWeight.bold,
        height: 22 / 20,
        color: AppColors.font_color_primary,
        fontSize: AppDimens.sp22,
      );

  static TextStyle get text_20_Bold_primary => TextStyle(
        fontSize: AppDimens.sp20,
        height: 26 / 20,
        fontWeight: FontWeight.bold,
        color: AppColors.font_color_primary,
      );

  static TextStyle get text_16_bold_primary => TextStyle(
        fontSize: AppDimens.sp16,
        height: 22 / 16,
        fontWeight: FontWeight.bold,
        color: AppColors.font_color_primary,
      );

  static TextStyle get text_14_bold_primary => TextStyle(
        fontSize: AppDimens.sp14,
        height: 22 / 16,
        fontWeight: FontWeight.bold,
        color: AppColors.primary_color,
      );

  static TextStyle get title4_14_bold_while => TextStyle(
        fontSize: AppDimens.sp14,
        height: 22 / 16,
        fontWeight: FontWeight.bold,
        color: AppColors.font_color_while,
      );

  static TextStyle get text_18_bold_black => TextStyle(
        fontSize: AppDimens.sp18,
        height: 24 / 18,
        fontWeight: FontWeight.bold,
        color: AppColors.font_color_black,
      );

  static TextStyle get text_16_bold_grey => TextStyle(
        fontSize: AppDimens.sp16,
        height: 22 / 16,
        fontWeight: FontWeight.bold,
        color: AppColors.text_grey,
      );

  static TextStyle get text_16_bold_white => TextStyle(
        fontSize: AppDimens.sp16,
        height: 22 / 16,
        fontWeight: FontWeight.bold,
        color: AppColors.font_color_while,
      );

  static TextStyle get title4_14_Regular_grey => TextStyle(
        fontSize: AppDimens.sp14,
        height: 18 / 14,
        fontWeight: FontWeight.normal,
        color: AppColors.text_grey,
      );

  static TextStyle get body1_14_Bold_primary => TextStyle(
        fontSize: AppDimens.sp14,
        height: 20 / 14,
        fontWeight: FontWeight.bold,
        color: AppColors.font_color_primary,
      );

  static TextStyle get body1_14_Regular_primary => TextStyle(
        fontSize: AppDimens.sp14,
        height: 17 / 14,
        fontWeight: FontWeight.normal,
        color: AppColors.font_color_primary,
      );

  static TextStyle get text_14_Regular_black => TextStyle(
        fontSize: AppDimens.sp14,
        height: 18 / 14,
        fontWeight: FontWeight.normal,
        color: AppColors.font_color_black,
      );

  static TextStyle get text_14_bold_black => TextStyle(
        fontSize: AppDimens.sp14,
        height: 18 / 14,
        fontWeight: FontWeight.bold,
        color: AppColors.font_color_black,
      );

  static TextStyle get body2_12_Bold_primary => TextStyle(
        fontSize: AppDimens.sp12,
        height: 18 / 12,
        fontWeight: FontWeight.bold,
        color: AppColors.font_color_primary,
      );

  static TextStyle get body2_12_Regular_primary => TextStyle(
        fontSize: AppDimens.sp12,
        height: 18 / 12,
        fontWeight: FontWeight.normal,
        color: AppColors.font_color_primary,
      );

  static TextStyle get body2_12_Regular_white => TextStyle(
        fontSize: AppDimens.sp12,
        height: 18 / 12,
        fontWeight: FontWeight.normal,
        color: AppColors.font_color_while,
      );

  static TextStyle get body2_12_Regular => TextStyle(
        fontSize: AppDimens.sp12,
        height: 18 / 12,
        fontWeight: FontWeight.normal,
        color: AppColors.font_color_black,
      );

  static TextStyle get body2_12_Regular_grey => TextStyle(
        fontSize: AppDimens.sp12,
        height: 18 / 12,
        fontWeight: FontWeight.normal,
        color: AppColors.color_63626a,
      );

  static TextStyle get body2_10_Regular_white => TextStyle(
    fontSize: AppDimens.sp12,
    height: 16 / 10,
    fontWeight: FontWeight.normal,
    color: AppColors.font_color_while,
  );
}

extension AppTextStyleExtension on TextStyle {
  /// 行高设置为1倍，按钮中常用
  TextStyle get line_height1 => copyWith(height: 1);

  /// 行高设置为1.2倍，row中上下对齐时比较完美点
  TextStyle get line_height1_2 => copyWith(height: 1.2);

  /// 0xFF19194B
  TextStyle get color_font_color_primary => copyWith(color: AppColors.font_color_primary);

  /// 0xFF797679
  TextStyle get color_font_color_secondary => copyWith(color: AppColors.font_color_secondary);

  /// 0xFFAAA6AA
  TextStyle get color_font_color_tertiary => copyWith(color: AppColors.font_color_tertiary);

  /// 0xFFCCCACC
  TextStyle get color_font_color_fourth => copyWith(color: AppColors.font_color_fourth);

  /// 0xFFFFFFFF
  TextStyle get color_font_color_fifth => copyWith(color: AppColors.font_color_while);

  /// 0xFFFA4263
  TextStyle get color_meaning_color_danger => copyWith(color: AppColors.meaning_color_danger);

  /// 0xFF48ECB1
  TextStyle get color_meaning_color_success => copyWith(color: AppColors.meaning_color_success);

  /// 0xFFCCCACC
  TextStyle get color_meaning_color_disable => copyWith(color: AppColors.meaning_color_disable);

  /// 0xFF6A00FF
  TextStyle get color_primary_color1 => copyWith(color: AppColors.primary_color1);

  /// 0xFF964DFF
  TextStyle get color_primary_color2 => copyWith(color: AppColors.primary_color2);

  /// 0xFFB17BFF
  TextStyle get color_primary_color3 => copyWith(color: AppColors.primary_color3);

  /// 0xFFDFC9FF
  TextStyle get color_primary_color4 => copyWith(color: AppColors.primary_color4);

  /// 0xFFF7F2FF
  TextStyle get color_primary_color5 => copyWith(color: AppColors.primary_color5);

  TextStyle get color_grey_color500 => copyWith(color: AppColors.grey_color500);

  TextStyle get color_grey_color400 => copyWith(color: AppColors.grey_color400);

  TextStyle get color_grey_color300 => copyWith(color: AppColors.grey_color300);

  TextStyle get color_grey_color200 => copyWith(color: AppColors.grey_color200);

  TextStyle get color_grey_color100 => copyWith(color: AppColors.grey_color100);
}
